Integrand size = 19, antiderivative size = 298 \[ \int \frac {\sin ^3(x)}{a+b \sin (x)+c \sin ^2(x)} \, dx=-\frac {b x}{c^2}+\frac {\sqrt {2} b \left (b-\frac {a c}{b}-\frac {b^2}{\sqrt {b^2-4 a c}}+\frac {3 a c}{\sqrt {b^2-4 a c}}\right ) \arctan \left (\frac {2 c+\left (b-\sqrt {b^2-4 a c}\right ) \tan \left (\frac {x}{2}\right )}{\sqrt {2} \sqrt {b^2-2 c (a+c)-b \sqrt {b^2-4 a c}}}\right )}{c^2 \sqrt {b^2-2 c (a+c)-b \sqrt {b^2-4 a c}}}+\frac {\sqrt {2} b \left (b-\frac {a c}{b}+\frac {b^2}{\sqrt {b^2-4 a c}}-\frac {3 a c}{\sqrt {b^2-4 a c}}\right ) \arctan \left (\frac {2 c+\left (b+\sqrt {b^2-4 a c}\right ) \tan \left (\frac {x}{2}\right )}{\sqrt {2} \sqrt {b^2-2 c (a+c)+b \sqrt {b^2-4 a c}}}\right )}{c^2 \sqrt {b^2-2 c (a+c)+b \sqrt {b^2-4 a c}}}-\frac {\cos (x)}{c} \]
-b*x/c^2-cos(x)/c+b*arctan(1/2*(2*c+(b-(-4*a*c+b^2)^(1/2))*tan(1/2*x))*2^( 1/2)/(b^2-2*c*(a+c)-b*(-4*a*c+b^2)^(1/2))^(1/2))*2^(1/2)*(b-a*c/b-b^2/(-4* a*c+b^2)^(1/2)+3*a*c/(-4*a*c+b^2)^(1/2))/c^2/(b^2-2*c*(a+c)-b*(-4*a*c+b^2) ^(1/2))^(1/2)+b*arctan(1/2*(2*c+(b+(-4*a*c+b^2)^(1/2))*tan(1/2*x))*2^(1/2) /(b^2-2*c*(a+c)+b*(-4*a*c+b^2)^(1/2))^(1/2))*2^(1/2)*(b-a*c/b+b^2/(-4*a*c+ b^2)^(1/2)-3*a*c/(-4*a*c+b^2)^(1/2))/c^2/(b^2-2*c*(a+c)+b*(-4*a*c+b^2)^(1/ 2))^(1/2)
Result contains complex when optimal does not.
Time = 0.75 (sec) , antiderivative size = 358, normalized size of antiderivative = 1.20 \[ \int \frac {\sin ^3(x)}{a+b \sin (x)+c \sin ^2(x)} \, dx=\frac {-b x+\frac {\left (i b^3-3 i a b c+b^2 \sqrt {-b^2+4 a c}-a c \sqrt {-b^2+4 a c}\right ) \arctan \left (\frac {2 c+\left (b-i \sqrt {-b^2+4 a c}\right ) \tan \left (\frac {x}{2}\right )}{\sqrt {2} \sqrt {b^2-2 c (a+c)-i b \sqrt {-b^2+4 a c}}}\right )}{\sqrt {-\frac {b^2}{2}+2 a c} \sqrt {b^2-2 c (a+c)-i b \sqrt {-b^2+4 a c}}}+\frac {\left (-i b^3+3 i a b c+b^2 \sqrt {-b^2+4 a c}-a c \sqrt {-b^2+4 a c}\right ) \arctan \left (\frac {2 c+\left (b+i \sqrt {-b^2+4 a c}\right ) \tan \left (\frac {x}{2}\right )}{\sqrt {2} \sqrt {b^2-2 c (a+c)+i b \sqrt {-b^2+4 a c}}}\right )}{\sqrt {-\frac {b^2}{2}+2 a c} \sqrt {b^2-2 c (a+c)+i b \sqrt {-b^2+4 a c}}}-c \cos (x)}{c^2} \]
(-(b*x) + ((I*b^3 - (3*I)*a*b*c + b^2*Sqrt[-b^2 + 4*a*c] - a*c*Sqrt[-b^2 + 4*a*c])*ArcTan[(2*c + (b - I*Sqrt[-b^2 + 4*a*c])*Tan[x/2])/(Sqrt[2]*Sqrt[ b^2 - 2*c*(a + c) - I*b*Sqrt[-b^2 + 4*a*c]])])/(Sqrt[-1/2*b^2 + 2*a*c]*Sqr t[b^2 - 2*c*(a + c) - I*b*Sqrt[-b^2 + 4*a*c]]) + (((-I)*b^3 + (3*I)*a*b*c + b^2*Sqrt[-b^2 + 4*a*c] - a*c*Sqrt[-b^2 + 4*a*c])*ArcTan[(2*c + (b + I*Sq rt[-b^2 + 4*a*c])*Tan[x/2])/(Sqrt[2]*Sqrt[b^2 - 2*c*(a + c) + I*b*Sqrt[-b^ 2 + 4*a*c]])])/(Sqrt[-1/2*b^2 + 2*a*c]*Sqrt[b^2 - 2*c*(a + c) + I*b*Sqrt[- b^2 + 4*a*c]]) - c*Cos[x])/c^2
Time = 2.27 (sec) , antiderivative size = 298, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3042, 3737, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sin ^3(x)}{a+b \sin (x)+c \sin ^2(x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (x)^3}{a+b \sin (x)+c \sin (x)^2}dx\) |
\(\Big \downarrow \) 3737 |
\(\displaystyle \int \left (\frac {b^2 \sin (x) \left (1-\frac {a c}{b^2}\right )+a b}{c^2 \left (a+b \sin (x)+c \sin ^2(x)\right )}-\frac {b}{c^2}+\frac {\sin (x)}{c}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\sqrt {2} b \left (-\frac {b^2}{\sqrt {b^2-4 a c}}+\frac {3 a c}{\sqrt {b^2-4 a c}}-\frac {a c}{b}+b\right ) \arctan \left (\frac {\tan \left (\frac {x}{2}\right ) \left (b-\sqrt {b^2-4 a c}\right )+2 c}{\sqrt {2} \sqrt {-b \sqrt {b^2-4 a c}-2 c (a+c)+b^2}}\right )}{c^2 \sqrt {-b \sqrt {b^2-4 a c}-2 c (a+c)+b^2}}+\frac {\sqrt {2} b \left (\frac {b^2}{\sqrt {b^2-4 a c}}-\frac {3 a c}{\sqrt {b^2-4 a c}}-\frac {a c}{b}+b\right ) \arctan \left (\frac {\tan \left (\frac {x}{2}\right ) \left (\sqrt {b^2-4 a c}+b\right )+2 c}{\sqrt {2} \sqrt {b \sqrt {b^2-4 a c}-2 c (a+c)+b^2}}\right )}{c^2 \sqrt {b \sqrt {b^2-4 a c}-2 c (a+c)+b^2}}-\frac {b x}{c^2}-\frac {\cos (x)}{c}\) |
-((b*x)/c^2) + (Sqrt[2]*b*(b - (a*c)/b - b^2/Sqrt[b^2 - 4*a*c] + (3*a*c)/S qrt[b^2 - 4*a*c])*ArcTan[(2*c + (b - Sqrt[b^2 - 4*a*c])*Tan[x/2])/(Sqrt[2] *Sqrt[b^2 - 2*c*(a + c) - b*Sqrt[b^2 - 4*a*c]])])/(c^2*Sqrt[b^2 - 2*c*(a + c) - b*Sqrt[b^2 - 4*a*c]]) + (Sqrt[2]*b*(b - (a*c)/b + b^2/Sqrt[b^2 - 4*a *c] - (3*a*c)/Sqrt[b^2 - 4*a*c])*ArcTan[(2*c + (b + Sqrt[b^2 - 4*a*c])*Tan [x/2])/(Sqrt[2]*Sqrt[b^2 - 2*c*(a + c) + b*Sqrt[b^2 - 4*a*c]])])/(c^2*Sqrt [b^2 - 2*c*(a + c) + b*Sqrt[b^2 - 4*a*c]]) - Cos[x]/c
3.1.2.3.1 Defintions of rubi rules used
Int[sin[(d_.) + (e_.)*(x_)]^(m_.)*((a_.) + (b_.)*sin[(d_.) + (e_.)*(x_)]^(n _.) + (c_.)*sin[(d_.) + (e_.)*(x_)]^(n2_.))^(p_), x_Symbol] :> Int[ExpandTr ig[sin[d + e*x]^m*(a + b*sin[d + e*x]^n + c*sin[d + e*x]^(2*n))^p, x], x] / ; FreeQ[{a, b, c, d, e}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && Integ ersQ[m, n, p]
Time = 2.21 (sec) , antiderivative size = 305, normalized size of antiderivative = 1.02
method | result | size |
default | \(\frac {2 a \left (\frac {2 \left (-2 \sqrt {-4 a c +b^{2}}\, a c +\sqrt {-4 a c +b^{2}}\, b^{2}+4 b c a -b^{3}\right ) \arctan \left (\frac {2 a \tan \left (\frac {x}{2}\right )+b +\sqrt {-4 a c +b^{2}}}{\sqrt {4 a c -2 b^{2}-2 b \sqrt {-4 a c +b^{2}}+4 a^{2}}}\right )}{\left (8 a c -2 b^{2}\right ) \sqrt {4 a c -2 b^{2}-2 b \sqrt {-4 a c +b^{2}}+4 a^{2}}}-\frac {2 \left (2 \sqrt {-4 a c +b^{2}}\, a c -\sqrt {-4 a c +b^{2}}\, b^{2}+4 b c a -b^{3}\right ) \arctan \left (\frac {-2 a \tan \left (\frac {x}{2}\right )+\sqrt {-4 a c +b^{2}}-b}{\sqrt {4 a c -2 b^{2}+2 b \sqrt {-4 a c +b^{2}}+4 a^{2}}}\right )}{\left (8 a c -2 b^{2}\right ) \sqrt {4 a c -2 b^{2}+2 b \sqrt {-4 a c +b^{2}}+4 a^{2}}}\right )}{c^{2}}-\frac {2 \left (\frac {c}{1+\tan ^{2}\left (\frac {x}{2}\right )}+b \arctan \left (\tan \left (\frac {x}{2}\right )\right )\right )}{c^{2}}\) | \(305\) |
risch | \(\text {Expression too large to display}\) | \(2188\) |
2/c^2*a*(2*(-2*(-4*a*c+b^2)^(1/2)*a*c+(-4*a*c+b^2)^(1/2)*b^2+4*b*c*a-b^3)/ (8*a*c-2*b^2)/(4*a*c-2*b^2-2*b*(-4*a*c+b^2)^(1/2)+4*a^2)^(1/2)*arctan((2*a *tan(1/2*x)+b+(-4*a*c+b^2)^(1/2))/(4*a*c-2*b^2-2*b*(-4*a*c+b^2)^(1/2)+4*a^ 2)^(1/2))-2*(2*(-4*a*c+b^2)^(1/2)*a*c-(-4*a*c+b^2)^(1/2)*b^2+4*b*c*a-b^3)/ (8*a*c-2*b^2)/(4*a*c-2*b^2+2*b*(-4*a*c+b^2)^(1/2)+4*a^2)^(1/2)*arctan((-2* a*tan(1/2*x)+(-4*a*c+b^2)^(1/2)-b)/(4*a*c-2*b^2+2*b*(-4*a*c+b^2)^(1/2)+4*a ^2)^(1/2)))-2/c^2*(c/(1+tan(1/2*x)^2)+b*arctan(tan(1/2*x)))
Leaf count of result is larger than twice the leaf count of optimal. 6531 vs. \(2 (261) = 522\).
Time = 2.25 (sec) , antiderivative size = 6531, normalized size of antiderivative = 21.92 \[ \int \frac {\sin ^3(x)}{a+b \sin (x)+c \sin ^2(x)} \, dx=\text {Too large to display} \]
Timed out. \[ \int \frac {\sin ^3(x)}{a+b \sin (x)+c \sin ^2(x)} \, dx=\text {Timed out} \]
\[ \int \frac {\sin ^3(x)}{a+b \sin (x)+c \sin ^2(x)} \, dx=\int { \frac {\sin \left (x\right )^{3}}{c \sin \left (x\right )^{2} + b \sin \left (x\right ) + a} \,d x } \]
-(c^2*integrate(-2*(2*(b^3 - a*b*c)*cos(3*x)^2 + 4*(2*a^2*b + a*b*c)*cos(2 *x)^2 + 2*(b^3 - a*b*c)*cos(x)^2 + 2*(b^3 - a*b*c)*sin(3*x)^2 + 2*(4*a*b^2 - a*c^2 - (2*a^2 - b^2)*c)*cos(x)*sin(2*x) + 4*(2*a^2*b + a*b*c)*sin(2*x) ^2 + 2*(b^3 - a*b*c)*sin(x)^2 - (2*a*b*c*cos(2*x) + (b^2*c - a*c^2)*sin(3* x) - (b^2*c - a*c^2)*sin(x))*cos(4*x) - 2*(2*(b^3 - a*b*c)*cos(x) + (4*a*b ^2 - a*c^2 - (2*a^2 - b^2)*c)*sin(2*x))*cos(3*x) - 2*(a*b*c + (4*a*b^2 - a *c^2 - (2*a^2 - b^2)*c)*sin(x))*cos(2*x) - (2*a*b*c*sin(2*x) - (b^2*c - a* c^2)*cos(3*x) + (b^2*c - a*c^2)*cos(x))*sin(4*x) - (b^2*c - a*c^2 - 2*(4*a *b^2 - a*c^2 - (2*a^2 - b^2)*c)*cos(2*x) + 4*(b^3 - a*b*c)*sin(x))*sin(3*x ) + (b^2*c - a*c^2)*sin(x))/(c^4*cos(4*x)^2 + 4*b^2*c^2*cos(3*x)^2 + 4*b^2 *c^2*cos(x)^2 + c^4*sin(4*x)^2 + 4*b^2*c^2*sin(3*x)^2 + 4*b^2*c^2*sin(x)^2 + 4*b*c^3*sin(x) + c^4 + 4*(4*a^2*c^2 + 4*a*c^3 + c^4)*cos(2*x)^2 + 8*(2* a*b*c^2 + b*c^3)*cos(x)*sin(2*x) + 4*(4*a^2*c^2 + 4*a*c^3 + c^4)*sin(2*x)^ 2 - 2*(2*b*c^3*sin(3*x) - 2*b*c^3*sin(x) - c^4 + 2*(2*a*c^3 + c^4)*cos(2*x ))*cos(4*x) - 8*(b^2*c^2*cos(x) + (2*a*b*c^2 + b*c^3)*sin(2*x))*cos(3*x) - 4*(2*a*c^3 + c^4 + 2*(2*a*b*c^2 + b*c^3)*sin(x))*cos(2*x) + 4*(b*c^3*cos( 3*x) - b*c^3*cos(x) - (2*a*c^3 + c^4)*sin(2*x))*sin(4*x) - 4*(2*b^2*c^2*si n(x) + b*c^3 - 2*(2*a*b*c^2 + b*c^3)*cos(2*x))*sin(3*x)), x) + b*x + c*cos (x))/c^2
Timed out. \[ \int \frac {\sin ^3(x)}{a+b \sin (x)+c \sin ^2(x)} \, dx=\text {Timed out} \]
Time = 25.58 (sec) , antiderivative size = 21407, normalized size of antiderivative = 71.84 \[ \int \frac {\sin ^3(x)}{a+b \sin (x)+c \sin ^2(x)} \, dx=\text {Too large to display} \]
- 2/(c*(tan(x/2)^2 + 1)) - atan((((8192*(4*a^2*b^7 - 3*a^4*b^5 - 20*a^3*b^ 5*c + 9*a^5*b^3*c + 20*a^4*b^3*c^2))/c^4 + ((8192*(4*a*b^7*c^2 - 2*a^2*b^7 *c + 2*a^4*b^5*c + 12*a^5*b*c^4 + 8*a^6*b*c^3 - 24*a^2*b^5*c^3 + 32*a^3*b^ 3*c^4 + 10*a^3*b^5*c^2 - 10*a^4*b^3*c^3 - 10*a^5*b^3*c^2))/c^4 + ((b^8 - a ^2*b^6 + 8*a^4*c^4 + 8*a^5*c^3 + b^5*(-(4*a*c - b^2)^3)^(1/2) + 8*a^3*b^4* c - a^2*b^3*(-(4*a*c - b^2)^3)^(1/2) + 33*a^2*b^4*c^2 - 38*a^3*b^2*c^3 - 1 8*a^4*b^2*c^2 - 10*a*b^6*c + 3*a^2*b*c^2*(-(4*a*c - b^2)^3)^(1/2) - 4*a*b^ 3*c*(-(4*a*c - b^2)^3)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